<template>
    <div class="xtx-bread-item">
      <RouterLink v-if="to" :to='to'><slot></slot></RouterLink>
      <!-- 没有to属性（不能点击） -->
      <span v-else><slot></slot></span>
    </div>
    <!-- <i class="iconfont icon-angle-right"></i> -->
    <!-- 删除i标签，通过h函数动态创建 -->
</template>

<script>
export default {
  name: 'XtxBreadItem',
  props: {
    to: {
      type: [String, Object],
      default: ''
    }
  }
}
</script>

<style lang="less" scoped>

</style>
